using System;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Castle.ActiveRecord;

namespace CastleSample.Entity
{
    [Serializable]
    public abstract class EntityBase : ActiveRecordBase
    {
        public override string ToString()
        {
            XmlSerializer xs = new XmlSerializer(GetType());
            StringBuilder sb = new StringBuilder();
            TextWriter tw = new StringWriter(sb);
            xs.Serialize(tw, this);
            tw.Flush();
            string str = sb.ToString();
            tw.Close();
            return str;
        }
    }
}